package org.example.entitys.managers;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Description
 * @Author 魏锴
 * @Date 2023/11/10
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Activity {
    private int id = -1;
    private String name;
    private String category;//类别
    private String title;
    private String creator;//创建者
    private String summary;//摘要对应属性为abstract
    private String detail_desc;//详细简介
    private int status = 0;//活动状态: 0表示已创建，1表示已发布，2表示已结束，3表示已归档，4表示已删除
    private Date create_time;//活动创建时间
    private Date archived_time;//活动归档时间
    private String pic_url;//图片url
    private Date start_time;//活动开始时间
    private Date end_time;//活动结束时间

    public Activity(String name, String category, String creator, String title) {
        this.name = name;
        this.category = category;
        this.title = title;
        this.creator = creator;
        this.summary = "a normal activity";
        this.detail_desc = "a normal " + category + " activity called " + title;
        this.pic_url = "";
        this.create_time = new Date();
    }

    public Activity(String name, String category, String title, String creator,
                    String summary, String detail_desc, String pic_url) {
        this.name = name;
        this.category = category;
        this.title = title;
        this.creator = creator;
        this.summary = summary;
        this.detail_desc = detail_desc;
        this.pic_url = pic_url;
    }
}
